package cn.gjxblog.modules.sys.controller;

import cn.gjxblog.common.annotation.SysLog;
import cn.gjxblog.common.model.HttpResult;
import cn.gjxblog.modules.third.oss.OssServiceContext;
import cn.gjxblog.modules.third.oss.OssTypeEnum;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;


/**
 * @Author guojiaxun
 * @Date 2019/9/9 17:45
 */
@RestController
public class TestController {

    @Resource
    OssServiceContext ossServiceContext;
    @SysLog("测试接口")
    @GetMapping("/test")
    @ApiOperation("测试接口")
    public HttpResult< List<String>> test() {
        String upload = ossServiceContext.upload(OssTypeEnum.Qiniu.type(), null, null);

        List<String> strings = Arrays.asList("123", "234");
        return  HttpResult.ok(strings,"获取数据成");
    }
}


